#ifndef QGSMAPVIEW_H
#define QGSMAPVIEW_H

#include "mymapcanvas.h"

#include <QQuickItem>
#include <qgsmapcanvas.h>
#include <qgsapplication.h>
#include <qgsvectorlayer.h>
#include <qgsrasterlayer.h>
#include <QWidget>
class MapWidget : public QWidget
{
    Q_OBJECT
    QML_ELEMENT
public:
    MapWidget(QWidget *parent = nullptr);

    QgsPointXY tranforomCrs(float lon, float lat);


private:
    MyMapCanvas *m_mapCanvas;
public slots:
    void initialize();
    void loadMap(const QString &path);

private:
    void testTracePoint(QgsVectorLayer *vectorLayer, QgsRasterLayer *layer);
    void testTraceLine(QgsVectorLayer *vectorLayer, QgsRasterLayer *layer);

protected:
    bool eventFilter(QObject *obj, QEvent *event) override;


signals:
};

#endif // QGSMAPVIEW_H
